package com.ocp.socket.busi.dataMilkUtils.mapper;

import com.ocp.socket.busi.dataMilkUtils.bean.CleanDetails;
import com.ocp.socket.busi.dataMilkUtils.bean.DataMilkVo;
import com.ocp.socket.busi.dataMilkUtils.bean.QueryDataMilkVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author : zhangzh
 * @description :
 * @Date Create in 13:27 2019/3/9
 * @Modified By :
 **/
@Mapper
public interface DataMilkUtilsMapper {

    int insertDataMilk(@Param("tableName") String tableName, @Param("dataMilkVo") DataMilkVo dataMilkVo);

    /**
     * 批量插入清洗挤奶数据
     * @param tableName     表名称
     * @param datas
     * @return
     */
    int insertDataMilks(@Param("tableName") String tableName, @Param("datas") List<DataMilkVo> datas);

    DataMilkVo getInfoByTableName(@Param("tableName") String tableName, @Param("queryDataMilkVo") QueryDataMilkVo queryDataMilkVo);

    List<DataMilkVo> getListByTableName(@Param("tableName") String tableName, @Param("queryDataMilkVo") QueryDataMilkVo queryDataMilkVo);

    int getMilkStatByTime(@Param("tableList") List<String> tableList,@Param("hallId") Integer hallId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    String getMilkIsRunByTime(@Param("tableList") List<String> tableList,@Param("hallId") Integer hallId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("lineCode") String lineCode);

    String getStatBylineCode(@Param("tableName") String tableName, @Param("lineCode") String lineCode, @Param("hallId")Integer hallId);

    CleanDetails getCleanDetailsByMilkHallId(@Param("airpInfoTable") List<String> airpInfoTable, @Param("tempInfoTable") List<String> tempInfoTable, @Param("milkHallId") Integer milkHallId, @Param("startTime") String startTime, @Param("endTime") String endTime);

}
